import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/5/4 8:42
 * @description:
 */
public class CopyFile {

  public static void main(String[] args) throws IOException {
    /*创建字符缓冲流对象：需要东莞国际泵字符流来构造 */
    BufferedReader  br=new BufferedReader(new FileReader("a.txt"));
    BufferedWriter bw=new BufferedWriter(new FileWriter("C:\\a.txt"));
  String line=null;
  while((line=br.readLine())!=null){
    bw.write(line);
    //添加换行符
    bw.newLine();
  }
  br.close();
  bw.close();
  }

}
